<?xml version="1.0" encoding="UTF-8"?>
<dxl:DXLMessage xmlns:dxl="http://greenplum.com/dxl/2010/12/">
  <dxl:Thread Id="0">
    <dxl:OptimizerConfig>
      <dxl:EnumeratorConfig Id="0" PlanSamples="0" CostThreshold="0"/>
      <dxl:StatisticsConfig DampingFactorFilter="0.750000" DampingFactorJoin="0.010000" DampingFactorGroupBy="0.750000" MaxStatsBuckets="100"/>
      <dxl:CTEConfig CTEInliningCutoff="0"/> 
      <dxl:WindowOids RowNumber="7000" Rank="7001"/>
      <dxl:TraceFlags Value="101013,102001,102002,102003,102144,103001,103027,103033"/>
    </dxl:OptimizerConfig>
    <dxl:Metadata SystemIds="0.GPDB">
      <dxl:Type Mdid="0.20.1.0" Name="Int8" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="8" PassByValue="true">
        <dxl:EqualityOp Mdid="0.410.1.0"/>
        <dxl:InequalityOp Mdid="0.411.1.0"/>
        <dxl:LessThanOp Mdid="0.412.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.414.1.0"/>
        <dxl:GreaterThanOp Mdid="0.413.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.415.1.0"/>
        <dxl:ComparisonOp Mdid="0.351.1.0"/>
        <dxl:ArrayType Mdid="0.1016.1.0"/>
        <dxl:MinAgg Mdid="0.2131.1.0"/>
        <dxl:MaxAgg Mdid="0.2115.1.0"/>
        <dxl:AvgAgg Mdid="0.2100.1.0"/>
        <dxl:SumAgg Mdid="0.2107.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:Type Mdid="0.16.1.0" Name="bool" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="1" PassByValue="true">
        <dxl:EqualityOp Mdid="0.91.1.0"/>
        <dxl:InequalityOp Mdid="0.85.1.0"/>
        <dxl:LessThanOp Mdid="0.58.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.1694.1.0"/>
        <dxl:GreaterThanOp Mdid="0.59.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.1695.1.0"/>
        <dxl:ComparisonOp Mdid="0.1693.1.0"/>
        <dxl:ArrayType Mdid="0.1000.1.0"/>
        <dxl:MinAgg Mdid="0.0.0.0"/>
        <dxl:MaxAgg Mdid="0.0.0.0"/>
        <dxl:AvgAgg Mdid="0.0.0.0"/>
        <dxl:SumAgg Mdid="0.0.0.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:GPDBScalarOp Mdid="0.412.1.0" Name="&lt;" ComparisonType="LT">
        <dxl:LeftType Mdid="0.20.1.0"/>
        <dxl:RightType Mdid="0.20.1.0"/>
        <dxl:ResultType Mdid="0.16.1.0"/>
        <dxl:OpFunc Mdid="0.469.1.0"/>
        <dxl:Commutator Mdid="0.413.1.0"/>
        <dxl:InverseOp Mdid="0.415.1.0"/>
      </dxl:GPDBScalarOp>
      <dxl:Type Mdid="0.1700.1.0" Name="numeric" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="false" Length="-1" PassByValue="false">
        <dxl:EqualityOp Mdid="0.1752.1.0"/>
        <dxl:InequalityOp Mdid="0.1753.1.0"/>
        <dxl:LessThanOp Mdid="0.1754.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.1755.1.0"/>
        <dxl:GreaterThanOp Mdid="0.1756.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.1757.1.0"/>
        <dxl:ComparisonOp Mdid="0.1769.1.0"/>
        <dxl:ArrayType Mdid="0.1231.1.0"/>
        <dxl:MinAgg Mdid="0.2146.1.0"/>
        <dxl:MaxAgg Mdid="0.2130.1.0"/>
        <dxl:AvgAgg Mdid="0.2103.1.0"/>
        <dxl:SumAgg Mdid="0.2114.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:GPDBFunc Mdid="0.1574.1.0" Name="nextval" ReturnsSet="false" Stability="Volatile" DataAccess="NoSQL" IsStrict="true">
        <dxl:ResultType Mdid="0.20.1.0"/>
      </dxl:GPDBFunc>
      <dxl:GPDBAgg Mdid="0.2107.1.0" Name="sum" IsSplittable="true">
        <dxl:ResultType Mdid="0.1700.1.0"/>
        <dxl:IntermediateResultType Mdid="0.1700.1.0"/>
      </dxl:GPDBAgg>
      <dxl:Type Mdid="0.2205.1.0" Name="regclass" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="4" PassByValue="true">
        <dxl:EqualityOp Mdid="0.607.1.0"/>
        <dxl:InequalityOp Mdid="0.608.1.0"/>
        <dxl:LessThanOp Mdid="0.609.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.611.1.0"/>
        <dxl:GreaterThanOp Mdid="0.610.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.612.1.0"/>
        <dxl:ComparisonOp Mdid="0.356.1.0"/>
        <dxl:ArrayType Mdid="0.2210.1.0"/>
        <dxl:MinAgg Mdid="0.0.0.0"/>
        <dxl:MaxAgg Mdid="0.0.0.0"/>
        <dxl:AvgAgg Mdid="0.0.0.0"/>
        <dxl:SumAgg Mdid="0.0.0.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
    </dxl:Metadata>
    <dxl:Query>
      <dxl:OutputColumns>
        <dxl:Ident ColId="7" ColName="sum" TypeMdid="0.1700.1.0"/>
      </dxl:OutputColumns>
      <dxl:CTEList>
        <dxl:LogicalCTEProducer CTEId="1" Columns="2">
          <dxl:LogicalProject>
            <dxl:ProjList>
              <dxl:ProjElem ColId="2" Alias="nextval">
                <dxl:FuncExpr FuncId="0.1574.1.0" FuncRetSet="false" TypeMdid="0.20.1.0">
                  <dxl:ConstValue TypeMdid="0.2205.1.0" Value="NKEAAA=="/>
                </dxl:FuncExpr>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:LogicalConstTable>
              <dxl:Columns>
                <dxl:Column ColId="1" Attno="1" ColName="" TypeMdid="0.16.1.0"/>
              </dxl:Columns>
              <dxl:ConstTuple>
                <dxl:Datum TypeMdid="0.16.1.0" Value="true"/>
              </dxl:ConstTuple>
            </dxl:LogicalConstTable>
          </dxl:LogicalProject>
        </dxl:LogicalCTEProducer>
      </dxl:CTEList>
      <dxl:LogicalCTEAnchor CTEId="1">
        <dxl:UnionAll InputColumns="7,6;4,5" CastAcrossInputs="false">
          <dxl:Columns>
            <dxl:Column ColId="7" Attno="1" ColName="sum" TypeMdid="0.1700.1.0"/>
            <dxl:Column ColId="6" Attno="2" ColName="?column?" TypeMdid="0.20.1.0"/>
          </dxl:Columns>
          <dxl:LogicalGroupBy>
            <dxl:GroupingColumns>
              <dxl:GroupingColumn ColId="6"/>
            </dxl:GroupingColumns>
            <dxl:ProjList>
              <dxl:ProjElem ColId="7" Alias="sum">
                <dxl:AggFunc AggMdid="0.2107.1.0" AggDistinct="false" AggStage="Normal" AggKind="n" >
                  <dxl:ValuesList ParamType="aggargs">
                  <dxl:Ident ColId="6" ColName="nextval" TypeMdid="0.20.1.0"/>
                  </dxl:ValuesList>
                  <dxl:ValuesList ParamType="aggdirectargs"/>
                  <dxl:ValuesList ParamType="aggorder"/>
                  <dxl:ValuesList ParamType="aggdistinct"/>
                </dxl:AggFunc>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:LogicalCTEConsumer CTEId="1" Columns="6"/>
          </dxl:LogicalGroupBy>
          <dxl:LogicalProject>
            <dxl:ProjList>
              <dxl:ProjElem ColId="5" Alias="?column?">
                <dxl:ConstValue TypeMdid="0.20.1.0" IsNull="true" IsByValue="true"/>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:LogicalGroupBy>
              <dxl:GroupingColumns/>
              <dxl:ProjList>
                <dxl:ProjElem ColId="4" Alias="sum">
                  <dxl:AggFunc AggMdid="0.2107.1.0" AggDistinct="false" AggStage="Normal" AggKind="n" >
                    <dxl:ValuesList ParamType="aggargs">
                    <dxl:Ident ColId="3" ColName="nextval" TypeMdid="0.20.1.0"/>
                    </dxl:ValuesList>
                    <dxl:ValuesList ParamType="aggdirectargs"/>
                    <dxl:ValuesList ParamType="aggorder"/>
                    <dxl:ValuesList ParamType="aggdistinct"/>
                  </dxl:AggFunc>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:LogicalCTEConsumer CTEId="1" Columns="3"/>
            </dxl:LogicalGroupBy>
          </dxl:LogicalProject>
        </dxl:UnionAll>
      </dxl:LogicalCTEAnchor>
    </dxl:Query>
    <dxl:Plan Id="0" SpaceSize="60">
      <dxl:Sequence>
        <dxl:Properties>
          <dxl:Cost StartupCost="0" TotalCost="862.000309" Rows="2.000000" Width="8"/>
        </dxl:Properties>
        <dxl:ProjList>
          <dxl:ProjElem ColId="4" Alias="sum">
            <dxl:Ident ColId="4" ColName="sum" TypeMdid="0.1700.1.0"/>
          </dxl:ProjElem>
        </dxl:ProjList>
        <dxl:CTEProducer CTEId="0" Columns="1">
          <dxl:Properties>
            <dxl:Cost StartupCost="0" TotalCost="0.000110" Rows="1.000000" Width="1"/>
          </dxl:Properties>
          <dxl:ProjList>
            <dxl:ProjElem ColId="1" Alias="nextval">
              <dxl:Ident ColId="1" ColName="nextval" TypeMdid="0.20.1.0"/>
            </dxl:ProjElem>
          </dxl:ProjList>
          <dxl:Result>
            <dxl:Properties>
              <dxl:Cost StartupCost="0" TotalCost="0.000109" Rows="1.000000" Width="8"/>
            </dxl:Properties>
            <dxl:ProjList>
              <dxl:ProjElem ColId="1" Alias="nextval">
                <dxl:FuncExpr FuncId="0.1574.1.0" FuncRetSet="false" TypeMdid="0.20.1.0">
                  <dxl:ConstValue TypeMdid="0.2205.1.0" Value="NKEAAA=="/>
                </dxl:FuncExpr>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:Filter/>
            <dxl:OneTimeFilter/>
            <dxl:Result>
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="0.000001" Rows="1.000000" Width="1"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="0" Alias="">
                  <dxl:ConstValue TypeMdid="0.16.1.0" Value="true"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:OneTimeFilter/>
            </dxl:Result>
          </dxl:Result>
        </dxl:CTEProducer>
        <dxl:GatherMotion InputSegments="0,1" OutputSegments="-1">
          <dxl:Properties>
            <dxl:Cost StartupCost="0" TotalCost="862.000183" Rows="2.000000" Width="8"/>
          </dxl:Properties>
          <dxl:ProjList>
            <dxl:ProjElem ColId="4" Alias="sum">
              <dxl:Ident ColId="4" ColName="sum" TypeMdid="0.1700.1.0"/>
            </dxl:ProjElem>
          </dxl:ProjList>
          <dxl:Filter/>
          <dxl:SortingColumnList/>
          <dxl:Append IsTarget="false" IsZapped="false">
            <dxl:Properties>
              <dxl:Cost StartupCost="0" TotalCost="862.000111" Rows="2.000000" Width="8"/>
            </dxl:Properties>
            <dxl:ProjList>
              <dxl:ProjElem ColId="4" Alias="sum">
                <dxl:Ident ColId="4" ColName="sum" TypeMdid="0.1700.1.0"/>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:Filter/>
            <dxl:Result>
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="431.000057" Rows="1.000000" Width="8"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="4" Alias="sum">
                  <dxl:Ident ColId="4" ColName="sum" TypeMdid="0.1700.1.0"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:OneTimeFilter/>
              <dxl:Aggregate AggregationStrategy="Sorted" StreamSafe="false">
                <dxl:Properties>
                  <dxl:Cost StartupCost="0" TotalCost="431.000057" Rows="1.000000" Width="8"/>
                </dxl:Properties>
                <dxl:GroupingColumns>
                  <dxl:GroupingColumn ColId="2"/>
                </dxl:GroupingColumns>
                <dxl:ProjList>
                  <dxl:ProjElem ColId="4" Alias="sum">
                    <dxl:AggFunc AggMdid="0.2107.1.0" AggDistinct="false" AggStage="Normal" AggKind="n" >
                      <dxl:ValuesList ParamType="aggargs">
                        <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                      </dxl:ValuesList>
                      <dxl:ValuesList ParamType="aggdirectargs"/>
                      <dxl:ValuesList ParamType="aggorder"/>
                      <dxl:ValuesList ParamType="aggdistinct"/>
                    </dxl:AggFunc>
                  </dxl:ProjElem>
                  <dxl:ProjElem ColId="2" Alias="nextval">
                    <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                  </dxl:ProjElem>
                </dxl:ProjList>
                <dxl:Filter/>
                <dxl:Sort SortDiscardDuplicates="false">
                  <dxl:Properties>
                    <dxl:Cost StartupCost="0" TotalCost="431.000044" Rows="1.000000" Width="8"/>
                  </dxl:Properties>
                  <dxl:ProjList>
                    <dxl:ProjElem ColId="2" Alias="nextval">
                      <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                    </dxl:ProjElem>
                  </dxl:ProjList>
                  <dxl:Filter/>
                  <dxl:SortingColumnList>
                    <dxl:SortingColumn ColId="2" SortOperatorMdid="0.412.1.0" SortOperatorName="&lt;" SortNullsFirst="false"/>
                  </dxl:SortingColumnList>
                  <dxl:LimitCount/>
                  <dxl:LimitOffset/>
                  <dxl:RedistributeMotion InputSegments="-1" OutputSegments="0,1">
                    <dxl:Properties>
                      <dxl:Cost StartupCost="0" TotalCost="431.000044" Rows="1.000000" Width="8"/>
                    </dxl:Properties>
                    <dxl:ProjList>
                      <dxl:ProjElem ColId="2" Alias="nextval">
                        <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                      </dxl:ProjElem>
                    </dxl:ProjList>
                    <dxl:Filter/>
                    <dxl:SortingColumnList/>
                    <dxl:HashExprList>
                      <dxl:HashExpr>
                        <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                      </dxl:HashExpr>
                    </dxl:HashExprList>
                    <dxl:CTEConsumer CTEId="0" Columns="2">
                      <dxl:Properties>
                        <dxl:Cost StartupCost="0" TotalCost="431.000019" Rows="1.000000" Width="8"/>
                      </dxl:Properties>
                      <dxl:ProjList>
                        <dxl:ProjElem ColId="2" Alias="nextval">
                          <dxl:Ident ColId="2" ColName="nextval" TypeMdid="0.20.1.0"/>
                        </dxl:ProjElem>
                      </dxl:ProjList>
                    </dxl:CTEConsumer>
                  </dxl:RedistributeMotion>
                </dxl:Sort>
              </dxl:Aggregate>
            </dxl:Result>
            <dxl:Result>
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="431.000046" Rows="1.000000" Width="8"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="7" Alias="sum">
                  <dxl:Ident ColId="7" ColName="sum" TypeMdid="0.1700.1.0"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:OneTimeFilter/>
              <dxl:RandomMotion InputSegments="-1" OutputSegments="0,1">
                <dxl:Properties>
                  <dxl:Cost StartupCost="0" TotalCost="431.000042" Rows="1.000000" Width="8"/>
                </dxl:Properties>
                <dxl:ProjList>
                  <dxl:ProjElem ColId="7" Alias="sum">
                    <dxl:Ident ColId="7" ColName="sum" TypeMdid="0.1700.1.0"/>
                  </dxl:ProjElem>
                </dxl:ProjList>
                <dxl:Filter/>
                <dxl:SortingColumnList/>
                <dxl:Aggregate AggregationStrategy="Plain" StreamSafe="false">
                  <dxl:Properties>
                    <dxl:Cost StartupCost="0" TotalCost="431.000020" Rows="1.000000" Width="8"/>
                  </dxl:Properties>
                  <dxl:GroupingColumns/>
                  <dxl:ProjList>
                    <dxl:ProjElem ColId="7" Alias="sum">
                      <dxl:AggFunc AggMdid="0.2107.1.0" AggDistinct="false" AggStage="Normal" AggKind="n" >
                        <dxl:ValuesList ParamType="aggargs">
                          <dxl:Ident ColId="5" ColName="nextval" TypeMdid="0.20.1.0"/>
                        </dxl:ValuesList>
                        <dxl:ValuesList ParamType="aggdirectargs"/>
                        <dxl:ValuesList ParamType="aggorder"/>
                        <dxl:ValuesList ParamType="aggdistinct"/>
                      </dxl:AggFunc>
                    </dxl:ProjElem>
                  </dxl:ProjList>
                  <dxl:Filter/>
                  <dxl:CTEConsumer CTEId="0" Columns="5">
                    <dxl:Properties>
                      <dxl:Cost StartupCost="0" TotalCost="431.000019" Rows="1.000000" Width="8"/>
                    </dxl:Properties>
                    <dxl:ProjList>
                      <dxl:ProjElem ColId="5" Alias="nextval">
                        <dxl:Ident ColId="5" ColName="nextval" TypeMdid="0.20.1.0"/>
                      </dxl:ProjElem>
                    </dxl:ProjList>
                  </dxl:CTEConsumer>
                </dxl:Aggregate>
              </dxl:RandomMotion>
            </dxl:Result>
          </dxl:Append>
        </dxl:GatherMotion>
      </dxl:Sequence>
    </dxl:Plan>
  </dxl:Thread>
</dxl:DXLMessage>
